<h1>Games</h1>

<% if flash[:notice] %>
<div id="flash_notice"><%=h flash[:notice] %></div>
<% end %>


<table align ="center">
<tr><td align="left">
<div class="game_list">
 <h2>Home Games</h2>

 <ul>
 <% for schedule in @home_games %>
 <li><%= link_to h(schedule.name), schedule_path(:id => schedule.id)  %></li>
 <% end %>
 <%= no_games(@home_games) %>
 </ul>
 
 </div>
 <br/>
 <div class="game_list">
 <h2>Away Games</h2>
 <ul>
 <% for schedule in @away_games %>
 <li><%= link_to h(schedule.name), schedule_path(:id => schedule.id)  %></li>
 <% end %>
 <%= no_games(@away_games) %>
 </ul>
</div>
 <br />
</td><td align = "right">
<img src ="images/game.jpg" height="300" width="500" alt="game">
</td></tr>
</table>
 
<% if admin? %>
 <p class="add" align="right"><%= link_to "Schedule New Game", new_schedule_path %> </p>
<% end %>
